package za.co.smartmi.dao;

import za.co.smartmi.model.Policy;
import za.co.smartmi.model.PolicyPk;
import za.co.smartmi.dao.exceptions.PolicyDaoException;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import za.co.smartmi.dao.support.JdbcDao;

public interface PolicyDao extends JdbcDao
{
	/**
	 * Method 'insert'
	 * 
	 * @param dto
	 * @return PolicyPk
	 */
	public PolicyPk insert(Policy dto);

	/** 
	 * Updates a single row in the policy table.
	 */
	public void update(PolicyPk pk, Policy dto) throws PolicyDaoException;

	/** 
	 * Deletes a single row in the policy table.
	 */
	public void delete(PolicyPk pk) throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria 'policyid = :policyid'.
	 */
	public Policy findByPrimaryKey(Integer policyid) throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria ''.
	 */
	public List<Policy> findAll() throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria 'policyid = :policyid'.
	 */
	public List<Policy> findWherePolicyidEquals(Integer policyid) throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria 'policyno = :policyno'.
	 */
	public List<Policy> findWherePolicynoEquals(String policyno) throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria 'premium = :premium'.
	 */
	public List<Policy> findWherePremiumEquals(BigDecimal premium) throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria 'status = :status'.
	 */
	public List<Policy> findWhereStatusEquals(String status) throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria 'startdate = :startdate'.
	 */
	public List<Policy> findWhereStartdateEquals(Date startdate) throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria 'enddate = :enddate'.
	 */
	public List<Policy> findWhereEnddateEquals(Date enddate) throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria 'csys = :csys'.
	 */
	public List<Policy> findWhereCsysEquals(String csys) throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria 'cdate = :cdate'.
	 */
	public List<Policy> findWhereCdateEquals(Date cdate) throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria 'usys = :usys'.
	 */
	public List<Policy> findWhereUsysEquals(String usys) throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria 'udate = :udate'.
	 */
	public List<Policy> findWhereUdateEquals(Date udate) throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria 'policystartdate = :policystartdate'.
	 */
	public List<Policy> findWherePolicystartdateEquals(Date policystartdate) throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria 'clientid = :clientid'.
	 */
	public List<Policy> findWhereClientidEquals(Integer clientid) throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria 'beneficiaryid = :beneficiaryid'.
	 */
	public List<Policy> findWhereBeneficiaryidEquals(Integer beneficiaryid) throws PolicyDaoException;

	/** 
	 * Returns all rows from the policy table that match the criteria 'repid = :repid'.
	 */
	public List<Policy> findWhereRepidEquals(Integer repid) throws PolicyDaoException;

	/** 
	 * Returns the rows from the policy table that matches the specified primary-key value.
	 */
	public Policy findByPrimaryKey(PolicyPk pk) throws PolicyDaoException;

}
